package com.joezhou.spring.factory;

import com.joezhou.spring.entity.Cat;
import lombok.extern.slf4j.Slf4j;

/**
 * @author JoeZhou
 */
@Slf4j
public class CatFactory {

    public CatFactory() {
        log.info("猫厂被实例化...");
    }

    public static Cat getInstanceByStatic() {
        log.info("执行了猫厂中的静态造猫方法...");
        return new Cat("加菲");
    }

    public Cat getInstanceByDynamic() {
        log.info("执行了猫厂中的动态造猫方法...");
        return new Cat("加菲");
    }
}
